import request from "@/utils/request";


export function getActivityList(params) {
    return request({
        url: '/api/activities',
        method: 'get',
        params
    });
}


export function getActivityDetail(id) {
    return request({
        url: `/api/activities/${id}`,
        method: 'get'
    });
}


export function updateActivity(data) {
    return request({
        url: `/api/activities/${data.id}`,
        method: 'put',
        data
    });
}


export function deleteActivity(id) {
    return request({
        url: `/api/activities/${id}`,
        method: 'delete'
    });
}


export function batchDeleteActivities(ids) {
    return request({
        url: '/api/activities/batch',
        method: 'post',
        data: ids
    });
}
